package com.jfreer.mybatis;

import com.jfreer.mybatis.mapper.ExAdminMapper;
import gen.mapper.TAdminMapper;
import gen.model.TAdmin;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by landy on 2017/11/23.
 */
public class Main {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext app = new ClassPathXmlApplicationContext("spring-dao.xml");
        TAdminMapper adminMapper = app.getBean(TAdminMapper.class);
        System.out.println(adminMapper.countAll());
        ExAdminMapper adminMapper2 = app.getBean(ExAdminMapper.class);
        System.out.println(adminMapper2.countAll());
        System.out.println(adminMapper2.countAll2());
        System.out.println("#########################");
        TAdmin record = new TAdmin();
        record.setId(0l);
        System.out.println(adminMapper.countBySelective(record));
    }
}

